package com.shuoyue.ycgk.ui.questionbank;

import com.shuoyue.ycgk.base.BaseMvpActivity;
import com.shuoyue.ycgk.entity.Option;
import com.shuoyue.ycgk.entity.QuestionParent;
import com.shuoyue.ycgk.entity.QuestionSimple;
import com.shuoyue.ycgk.entity.UserAnswer;
import com.shuoyue.ycgk.entity.UserAnswerPager;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;

/**
 * 统计基类
 */
public abstract class BaseCountActivity extends BaseMvpActivity {

    protected int total;


    public ArrayList<QuestionParent> getQuestiongWrongs(List<QuestionParent> questionParents) {
        ArrayList<QuestionParent> arrayList = new ArrayList<>();
        for (QuestionParent questionParent : questionParents) {
            for (QuestionSimple questionSimple : questionParent.getQuestionSimpleDTOS()) {
                if (questionSimple.getIsAnswerRight() == 0) {
                    arrayList.add(questionParent);
                }
            }
        }
        return arrayList;
    }

}


